fix returning remote data in get_data for all devices
authorFelix Fietkau <[email protected]>
Sat, 21 Jun 2025 08:34:27 +0000 (10:34 +0200)
committerFelix Fietkau <[email protected]>
Sat, 21 Jun 2025 08:34:27 +0000 (10:34 +0200)
Signed-off-by: Felix Fietkau <[email protected]>
ufpd

diff --git a/ufpd b/ufpd
index 0b3e283860196553f233107b51311b45ab5ea3a1..26f263c995aa0365dfe1067fdcdecf171be862d7 100755 (executable)
--- a/ufpd
+++ b/ufpd
@@ -329,10 +329,10 @@ global.ubus_object = {
 
                        refresh_plugins();
 
+                       let cur_devices = network_devices(req.args.local);
                        if (!mac)
-                               return devices;
+                               return cur_devices;
 
-                       let cur_devices = network_devices(req.args.local);
                        let dev = cur_devices[mac];
                        if (!dev)
                                return libubus.STATUS_NOT_FOUND;